# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Transcoder.V1beta1.Model.MuxStream do
  @moduledoc """
  Multiplexing settings for output stream.

  ## Attributes

  *   `container` (*type:* `String.t`, *default:* `nil`) - The container format. The default is `"mp4"` Supported container formats: - 'ts' - 'fmp4'- the corresponding file extension is `".m4s"` - 'mp4' - 'vtt'
  *   `elementaryStreams` (*type:* `list(String.t)`, *default:* `nil`) - List of `ElementaryStream.key`s multiplexed in this stream.
  *   `encryption` (*type:* `GoogleApi.Transcoder.V1beta1.Model.Encryption.t`, *default:* `nil`) - Encryption settings.
  *   `fileName` (*type:* `String.t`, *default:* `nil`) - The name of the generated file. The default is `MuxStream.key` with the extension suffix corresponding to the `MuxStream.container`. Individual segments also have an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `"mux_stream0000000123.ts"`.
  *   `key` (*type:* `String.t`, *default:* `nil`) - A unique key for this multiplexed stream. HLS media manifests will be named `MuxStream.key` with the `".m3u8"` extension suffix.
  *   `segmentSettings` (*type:* `GoogleApi.Transcoder.V1beta1.Model.SegmentSettings.t`, *default:* `nil`) - Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :container => String.t() | nil,
          :elementaryStreams => list(String.t()) | nil,
          :encryption => GoogleApi.Transcoder.V1beta1.Model.Encryption.t() | nil,
          :fileName => String.t() | nil,
          :key => String.t() | nil,
          :segmentSettings => GoogleApi.Transcoder.V1beta1.Model.SegmentSettings.t() | nil
        }

  field(:container)
  field(:elementaryStreams, type: :list)
  field(:encryption, as: GoogleApi.Transcoder.V1beta1.Model.Encryption)
  field(:fileName)
  field(:key)
  field(:segmentSettings, as: GoogleApi.Transcoder.V1beta1.Model.SegmentSettings)
end

defimpl Poison.Decoder, for: GoogleApi.Transcoder.V1beta1.Model.MuxStream do
  def decode(value, options) do
    GoogleApi.Transcoder.V1beta1.Model.MuxStream.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Transcoder.V1beta1.Model.MuxStream do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
